﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace _12_下拉框
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void label1_Click(object sender, EventArgs e)
        {

        }

        private void Form1_Load(object sender, EventArgs e)
        {
            this.comboBox1.Items.Add("你好");
            this.comboBox1.Items.Add("哦哈哟");
            this.comboBox1.Items.Add("呀哈喽");
            this.comboBox1.Items.Add("现充爆炸");
        }

        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            MessageBox.Show(this.comboBox1.Text);
        }

        private void label2_Click(object sender, EventArgs e)
        {

        }

        private void checkBox1_CheckedChanged(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {

            string str = "";
            //if (this.checkBox1.Checked == true)
            //{
            //    if (!str.Equals(""))
            //    {
            //        str += ",";
            //    }
            //    str += this.checkBox1.Text;


            //}
            //if (this.checkBox2.Checked == true)
            //{
            //    if (!str.Equals(""))
            //    {
            //        str += ",";
            //    }
            //    str += this.checkBox2.Text;

            //}
            //if (this.checkBox3.Checked == true)
            //{
            //    if (!str.Equals(""))
            //    {
            //        str += ",";
            //    }
            //    str += this.checkBox3.Text;

            //}
            //if (this.checkBox4.Checked == true)
            //{
            //    if (!str.Equals(""))
            //    {
            //        str += ",";
            //    }
            //    str += this.checkBox4.Text;


            //}
            //foreach (CheckBox item in this.panel1.Controls)
            //{
            //    if (item.Checked == true)
            //    {
            //        if (!str.Equals(""))
            //        {
            //            str += ",";
            //        }
            //        str += item.Text;
            //    }
            //}
            foreach (RadioButton item in panel2.Controls)
            {
                if (item.Checked) {
                    MessageBox.Show("促销方案:"+item.Text);
                }
            }

            //MessageBox.Show(str);
        }

        private void label3_Click(object sender, EventArgs e)
        {

        }

        private void radioButton2_CheckedChanged(object sender, EventArgs e)
        {

        }
    }

    public class a { }

    public class b { }
    public class c
    {

    }
}
